//
// Created by 顾蛟 on 2020/7/4.
//

#ifndef DEMOTRIANGLE_GLUTILS_H
#define DEMOTRIANGLE_GLUTILS_H

#include <GLES3/gl3.h>
#include "LogUtil.h"
#include <cstdlib>

class GLUtils {
public:
    static GLuint LoadShader(GLenum type, const char *shaderSource);
    static GLuint CreateProgram(const char *vertexShaderSource, const char *fragShaderSource,
            GLuint &vertexHandler, GLuint &fragShaderHandler);
    static void DeleteProgram(GLuint &program);
    static void CheckGLError(const char *GLOperation);
};


#endif //DEMOTRIANGLE_GLUTILS_H
